#include <iostream>

using namespace std;
int main() {
   int sum=0;
   int n;  //给定一个整数
    scanf("%d",&n);
    while(n!=0){
        sum=sum*10+n%10;
        n=n/10;
    }
    printf("%d",sum);

    return 0;
}
